package com.bzg.transaction.service;

import com.bzg.transaction.dto.UserDto;
import com.bzg.transaction.mapper.UserMapper;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {

	@Autowired
	private UserMapper userMapper;

	@Transactional
	public UserDto queryUser(){
//		userMapper.queryUser();
		return ((UserService)AopContext.currentProxy()).queryUser1();
	}

	@Transactional
	public UserDto queryUser1(){
		return userMapper.queryUser();
	}
}
